﻿#!/usr/bin/env python# coding=utf-8from google.appengine.ext import webappfrom gaesessions import get_current_sessionclass BaseHandler(webapp.RequestHandler):  def check_login(self):    """判断用户是否登录"""    if not "person" in get_current_session():      self.redirect("/user/login")        def get_login_user(self):    return get_current_session()["person"]class ErrorMessageHandler(BaseHandler):  """带有错误提示页面的父类"""  def get_error_message_list(self, p, m):    if p != None:      r = []      for i in p:        if i in m:          r.append(m[i])      return r    else:      return []